<template>
  <div class="usual-address">
    <el-cascader
      style="width:100%"
      v-model="Address_value"
      :options="addressList"
      :props="{ checkStrictly: true }"
      clearable
      @change="handleChange"
    />
  </div>
</template>

<script>
export default {
  name: "UsualAddress",
  data() {
    return {
      Address_value: [],
      addressList: [
        {
          value: 11,
          label: "园林办事处",
          children: [
            {
              value: 113,
              label: "城南社区"
            },
            {
              value: 114,
              label: "东方社区"
            },
            {
              value: 115,
              label: "辉煌社区"
            },
            {
              value: 116,
              label: "深河社区"
            }
          ]
        },
        {
          value: 22,
          label: "杨市办事处",
          children: [
            {
              value: 224,
              label: "翰岭社区",
              children: [
                {
                  value: 225,
                  label: "菜科所"
                },
                {
                  value: 226,
                  label: "多种场"
                },
                {
                  value: 227,
                  label: "处直单位"
                }
              ]
            }
          ]
        },
        {
          value: 33,
          label: "周矶办事处",
          children: [
            {
              value: 333,
              label: "爱民社区",
              children: [
                {
                  value: 334,
                  label: "卫生院"
                },
                {
                  value: 335,
                  label: "财管所"
                },
                {
                  value: 336,
                  label: "政府"
                }
              ]
            }
          ]
        },
        {
          value: 44,
          label: "广华办事处",
          children: [
            {
              value: 443,
              label: "青龙村"
            },
            {
              value: 444,
              label: "舒家沟村"
            },
            {
              value: 445,
              label: "兰家岗村"
            }
          ]
        },
        {
          value: 55,
          label: "泰丰办事处",
          children: [
            {
              value: 553,
              label: "锦原社区"
            }
          ]
        },
        {
          value: 66,
          label: "高场办事处",
          children: [
            {
              value: 663,
              label: "街居委会"
            },
            {
              value: 664,
              label: "农科所"
            }
          ]
        },
        {
          value: 77,
          label: "竹根滩镇",
          children: [
            {
              value: 773,
              label: "文卫路"
            },
            {
              value: 774,
              label: "竹中街"
            }
          ]
        }
      ]
    }
  },
  methods: {
    handleChange(value) {
      console.log(value)
      this.$emit("update:userAddressValue", value)
    },
    clear() {
      this.Address_value = ""
    }
  }
}
</script>

<style lang="scss" scoped></style>
